﻿CREATE TABLE [dbo].[LocationTime]
(
	[Id] INT NOT NULL PRIMARY KEY,
	[ShiftTimeID] INT NOT NULL ,
	[LocationID] INT NOT NULL,
	[PhysicianID] INT NULL,
	[ScribeId1] INT NULL,
	[ScribeId2] INT NULL,
	[ScribeId3] INT NULL,
	CONSTRAINT FK_LocationTime_ShiftTime FOREIGN KEY ([ShiftTimeID]) REFERENCES ShiftTime(Id),
	CONSTRAINT FK_LocationTime_Location FOREIGN KEY ([LocationID]) REFERENCES Location(Id),
	CONSTRAINT FK_LocationTime_Physician FOREIGN KEY ([PhysicianID]) REFERENCES Physician(Id),
	CONSTRAINT FK_LocationTime_Scribe1 FOREIGN KEY ([ScribeID1]) REFERENCES Scribe(Id),
	CONSTRAINT FK_LocationTime_Scribe2 FOREIGN KEY ([ScribeID2]) REFERENCES Scribe(Id),
	CONSTRAINT FK_LocationTime_Scribe3 FOREIGN KEY ([ScribeID3]) REFERENCES Scribe(Id),
)
